package com.zian.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;

@Data
@ApiModel(description = "统计各个订单状态的数量")
public class StatisticsOrderCountByStatus {

    @ApiModelProperty( "所有订单")
    private Integer allOrder = 0;

    @ApiModelProperty( "待配货")
    private Integer toAllocate = 0;

    @ApiModelProperty( "待出库")
    private Integer toDeliver =  0;

    @ApiModelProperty( "派送中")
    private Integer delivering = 0 ;

    @ApiModelProperty( "已完成")
    private Integer completed = 0 ;

    @ApiModelProperty( "已取消")
    private Integer canceled = 0 ;

    @ApiModelProperty( "手动取消")
    private Integer cancelByUser = 0;

    @ApiModelProperty( "商家取消")
    private Integer cancelByShop = 0 ;

    @ApiModelProperty( "超时取消")
    private Integer cancelByTimeout = 0;

    public Integer countAllOrder() {
        return this.toAllocate + this.toDeliver + this.delivering + this.completed + this.canceled;
    }

    public Integer countCanceled() {
        return this.cancelByUser + this.cancelByShop + this.cancelByTimeout;
    }


}
